<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
 * Common class
 *
 * This class contains common static methods which can be used almost everywhere in project
 * It is better to set this class on autoload
 * 
 * @package CodeIgniter
 * @subpackage application/libraries
 * @author Dauren
 */
class Common {

	/**
	 * Constructor
	 */
	public function __construct() {
		
	}

	/**
	 * Prints the passed data in preformatted text using Prettify JS Script
	 *  
	 * @access public
	 * @param mixed $data 
	 * @return void
	 */
	public static function debug($data) {
		echo '<link rel="stylesheet" href="'.asset_url('js/prettifier/desert.css').'" />';
		echo '<script src="'.asset_url('js/prettifier/prettify.js').'"></script>';
		echo '<pre class="prettyprint">';
		print_r($data);
		echo '</pre><br />';
		echo '<script>prettyPrint();</script>';
	}
	
	/**
	 * Prints the passed string with new line
	 * 
	 * @access public
	 * @param string $string 
	 * @return void
	 */
	public static function printLine($string) {
		echo $string, '<br />';
	}
}
